import moment from 'moment';
import { ymdhms } from 'configs/constants';
import { formatValue } from 'utils/share';

export default [
  {
    title: '标题',
    dataIndex: 'title',
    render: value => formatValue(value)
  },
  {
    title: '分类',
    dataIndex: 'article_category.name',
    render: value => formatValue(value)
  }, 
  {
    title: '作者',
    dataIndex: 'author',
    render: value => formatValue(value)
  },
  {
    title: '创建时间',
    dataIndex: 'created_at',
    render: val => moment(val).format(ymdhms)
  },
  {
    title: '更新时间',
    dataIndex: 'updated_at',
    render: val => moment(val).format(ymdhms)
  }
];